package come.bjpowernode.javase.io;
/*
BufferedWriter:带有缓冲的字符输出流。

 */

import java.io.BufferedWriter;
import java.io.FileOutputStream;
import java.io.FileWriter;
import java.io.OutputStreamWriter;

public class BufferWriterTest {
    public static void main(String[] args) throws Exception {
        BufferedWriter out = new BufferedWriter(
                new OutputStreamWriter(
                new FileOutputStream("myFile",true)));
        //BufferedWriter out = new BufferedWriter(new FileWriter("myFile"));
        out.write("hello World");
        out.write("\n");
        out.write("hello");
        out.flush();
        out.close();
    }
}
